-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a function to get nCells/nNodes #31
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice addition, looks good. Just two things:
- Please run black/flake8 to ensure there are no linting errors and all tests pass
- Can you add a one-line example of how to call this function from a script? You can add it to the method docstring.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to also make the wall boundary cells/nodes part a separate function for consistency? There are no tests right now, but if you are familiar with unittest
it'd be good to start some.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a couple of minor suggestions.
As @nwu63 mentioned, it would also be great if we can get some unittests started.
cgnsutilities/cgnsutilities.py
Outdated
def printInfo(self): | ||
"""Print some information on the mesh to screen. Specifically | ||
information needed by the drag prediction workshop""" | ||
def getCellsNodes(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe use a more descriptive function name like getTotalCellsAndNodes
?
cgnsutilities/cgnsutilities.py
Outdated
|
||
def printInfo(self): | ||
"""Print some information on the mesh to screen. Specifically | ||
information needed by the drag prediction workshop""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is being updated, please update the docstring with more relevant text.
@akleb I reverted your commits and manually reapplied it, since |
@nwu63 yes, that looks like everything |
Purpose
Adds a function that returns the total number of cells and nodes in a grid.
Type of change
Testing
I am not sure what our unit testing procedure is, but I can write one if necessary.
Checklist
flake8
andblack
to make sure the code adheres to PEP-8 and is consistently formatted